package com.eric.sung.demo
import java.lang.String

object Test {
  val map = Map[String,String]("h"->"H","e"->"E","l"->"L","o"->"O","m"->"M")

  def main(args: Array[String]): Unit = {
    // print(demo.apply(2, 3));
    map.foreach((i)=>print(
        i match {
          case i =>
            i.toString
          case none =>
            i +("h")
          case _ =>
            i + "b"
        }
        ))
    //any("p",demo)
    //demo(1,2)
    //map.foreach(print(_) )
        test("F","B")("I")
  }
  def test(a: String, b: String)=(c:String)=>{
    print(a + b+c);
  }
  val demo = (a: Int, b: Int) => {
	     
  }
  def any(m:String,p: =>  Any){
  }
  override def toString = "this is my test"
  
  def tyt (a:String,matcher:(String,String)=>Boolean){
    
  }
  val mon = {print _}
  val mont= (x:Int) =>{x>0}
  // 高阶函数
  def matcher(query:String,mat: =>Boolean)={
    //if(mat("s",query))
      true
  }
  //matcher("s",_.contains(_))
  matcher("s",4>6)
  //curry
  def curry(x:String)(y:String)=x+y

}